package com.mycompany.app.hr.payroll.service;

import java.util.Date;

import com.mycompany.app.hr.payroll.model.PayPeriod;

public interface IPayPeriodService {
    
    /**package: TNA_COMMON.function cross_pay_period 
     * 
     * 
     *  query_date := sysdate;
       select pm.pay_month_id into curr_pay_month from pay_month pm 
       where pm.from_date <= query_date and pm.to_date >= query_date;
       
       query_date := v_date;
       select pm.pay_month_id into pay_month from pay_month pm 
       where pm.from_date <= query_date and pm.to_date >= query_date;
  
       if( curr_pay_month <> pay_month ) then
           return true;
       else
           return false;
       end if;
     */
    public boolean isCurrentPayPeriod(Date date);
    
    /**
     * return pay period which cover input date.
     * @param date
     * @return
     */
    public PayPeriod findPayPeriod(Date date);
    
    
    /**
     *  if( idx.payroll_clear_date is null ) then
               return false;
           else
               return true;
           end if;
     */
    /**
     * 
     * @return
     */
    public boolean isBeforePayPeriodCalcOver();
    
    
    /**
     *  pm := find_pay_month( reconcile_utils.get_current_date );
       return (pm.from_date - reconcile_utils.get_date(v_date) ) = 0;
     */
    public boolean isFirstDayOfCurrentPayPeriod(Date date);
    

}
